package com.jomoo.css.common.core.hibernate;


import org.hibernate.boot.model.naming.Identifier;
import org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl;
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;

public class UpperTableStrategy extends PhysicalNamingStrategyStandardImpl {


    private static final long serialVersionUID = 1L;

    @SuppressWarnings("static-access")
    @Override
    public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment context) {
        String tableName = name.getText();
        return name.toIdentifier(tableName); //转表名
    }

    @SuppressWarnings("static-access")
    @Override
    public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment context) {
        String colnumName = name.getText();
        return name.toIdentifier(colnumName);//转字段名

    }
}